1. Field of the Invention
The present invention relates to encoding and decoding methods and encoding and decoding devices, and more particularly, to selective prediction encoding and decoding methods and selective prediction encoding and decoding devices that can improve performance of a video codec.
2. Description of the Related Art
Generally, a video coding method can be classified into an intra coding method of performing an intra-screen encoding method such as I frame and an inter coding method of performing an inter-screen encoding method such as P frame or B frame. A conventional prediction encoding method of coding an intra frame will be described with reference to FIGS. 1 and 2.
FIG. 1 is a diagram illustrating a quantization table used for AC/DC prediction of a conventional MPEG-4 intra coding method.
The AC/DC prediction shown in FIG. 1 is used for improving a compression ratio of a macro block in an intra mode coding. In an example of the intra mode coding used in MPEG-4 which is based on the AC/DC prediction, a position of a current block in a reference block is determined with reference to a direction of the AC/DC coefficients of the reference block, a AC/DC prediction value of the current block is calculated, and then the current block is encoded in accordance with the calculated AC/DC prediction value by the use of an entropy (or Huffman) coding process.
The DC coefficient 100 of the current block is encoded using a difference between the DC coefficient and DC coefficients of a left or upper block. The AC coefficient 110 is encoded by the use of a Run Length coding or a Huffman coding after the values of the first row or column are predicted in the direction used in the DC prediction. A quantization table including DCT coefficients obtained by performing a DCT operation in a unit of macro block is shown in FIG. 1. Here, DC components and AC components are independently quantized. It should be noticed, however, that the DC components and the AC components are independently quantized in the intra mode, but both components are simultaneously quantized in the inter mode. In the quantization table, no predetermined value exists but the coefficients may be set individually or may have one constant value. The DC coefficient and the AC coefficient in the quantized DCT coefficients are independently predicted. A difference value between the DC coefficient of the current block and the DC coefficient of the left or upper block thereof is encoded by the use of the entropy coding. A difference value between the AC coefficient of the current block and the AC coefficient in the first row or column of the reference block in the direction determined in the DC prediction is obtained, other AC components are encoded by the use of the entropy coding after arranging the AC component values of the current block in one line by a zigzag scan 120. However, it is obvious to those skilled in the art that the AC prediction may not be always performed and a block not requiring the AC prediction may exist.
FIG. 2 is an explanatory diagram illustrating an AVC (Advanced Video Coding) intra prediction of a conventional AVC intra coding method.
The AVC intra prediction shown in FIG. 2 is used for improving a coding efficiency of a macro block, by performing a prediction in four directions 210, 220, 230, and 240 with information on surround blocks in a unit of macro block and selecting one direction in which a value of motion compensation error (SAD: Sum of Absolute Difference) such as MSE (Mean Square Error) is smallest. For reference, the AVC intra prediction employs 4×4 mode (nine modes directions) and 16×16 (four modes directions) for luminance and 8×8 mode (four modes-directions) for chrominance.
Since it has been conventionally considered that the coding efficiency of the AVC intra prediction is greater than that of the AC/DC prediction, the intra coding has been performed using only the AVC intra prediction. In some macro blocks, the AC/DC prediction may often provide a compression ratio greater than the AVC intra prediction. However, an efficient coding prediction which can utilize two predictions in parallel has not been developed. In addition, a method of efficiently decoding bit streams encoded by the use of various selective encoding methods has not been yet developed.